function getObjById(id){
	if(id){
		return document.getElementById(id);
	}
	return null;
}
function getObjsByName(name){
	if(name){
		return document.getElementsByName(name);
	}
	return null;
}
function checkMail(mail){
	var regex=/^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
	if(!regex.test(mail)){
		return false;
	}
	return true;
}
function checkNumber(num){
	var regex=/^\d+$/;
	if(!regex.test(num)){
		return false;
	}
	return true;
}
function getSuccessMessage(succOrfail,failMessage){
	if(succOrfail){
		return '保存成功！';
	}else{
		return '保存失败！\n'+failMessage;
	}
}
function RowsPerPage(pagesize){
	if(!checkNumber(pagesize)){
		alert('请输入数字！');
		return ;
	}
	document.frmPage.pageSize.value = pagesize;
	document.frmPage.submit();
  	return ;
}


function Jumping(tpage){
	if(!checkNumber(tpage)){
		alert('请输入数字！');
		return ;
	}
	document.frmPage.page.value = tpage;
	document.frmPage.submit();
	return ;
}

function gotoPage(pagenum){
	document.frmPage.page.value = pagenum;
  	document.frmPage.submit();
  	return ;
}